package com.atguigu.gulimall.product.stream;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Author ziChuan
 * @Create: 2021/7/21 17:40
 * @Description:
 */
public class test01 {
    public static void main(String[] args) {
        List<String> strings = Arrays.asList("abc", "", "bc", "efg", "abcd","", "jkl");
        List<String> filtered = strings.stream().filter(string -> !string.isEmpty()).collect(Collectors.toList());
        for(String s:filtered){
            System.out.println(s);
        }
    }
}
